<template>
  <view class="select-detail-address">
<!--    <map
        name="selectDetail"
        id="detailMap"
        longitude="112.97776"
        latitude="28.20781"
        scale="14"
        show-location
        :markers="markers"
        @markertap="handleClickMarker"
    ></map>-->

    <liu-chooseAddress
        ref="liuChooseAddress"
        @submit="submitAddress"
        @detele="deteleAddress"
    >
    </liu-chooseAddress>

  </view>
</template>

<script>
export default {
  data() {
    return {
      markers: []
    };
  },
  methods: {
    handleClickMarker() {

    },
    submitAddress(e) {
      console.log('添加调地址信息：', e)
    },
    //删除地址回调
    deteleAddress(e) {
      console.log('所删除的地址信息：', e)
    },
    // 地址回显(编辑)调用此方法
    editAddress() {
      let obj = {
        id: '1',
        detailAddress: '', //门牌号(详细地址)
        userName: '', //联系人姓名
        userPhone: '', //手机号
        lableName: '', //标签
        sexType: '', //性别
        title: '', //地址概述
        address: '', //详细地址
        longitude: '', //经度
        latitude: '', //纬度
        agreeState: '', //是否是默认地址
      }
      this.$refs.liuChooseAddress.setData(obj)
    }
  },
}
</script>

<style lang="scss">
page {
  width: 100%;
  height: 100%;
}

.select-detail-address {
  width: 100%;
  height: 100%;
  #detailMap {
    width: 100%;
    height: 100%;
  }
}

</style>
